﻿<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
    <script type="text/javascript" src="http://oa.xn-group.cn/jquery/easyui-1.4.4/jquery.min.js"></script>
    <script language="JavaScript" type="text/javascript">
        function ajax_sendJson() {
            //var tUrl = '/Api/Customer/Login';
            var tUrl = '/Api/SO/Save?token=8007E9DVVI99IPMP24XI';
            var tJsonStr = '{"data":[{"cInvCode":"800039-T0","tCount":1},{"cInvCode":"800044-T0","tCount":1},{"cInvCode":"800051-T0","tCount":1},{"cInvCode":"800059-T0","tCount":1},{"cInvCode":"800064-T0","tCount":1},{"cInvCode":"800065-T0","tCount":1},{"cInvCode":"800093-T0","tCount":1},{"cInvCode":"800095-T0","tCount":1},{"cInvCode":"800100-T0","tCount":1},{"cInvCode":"800105-T0","tCount":1},{"cInvCode":"800123-T0","tCount":4},{"cInvCode":"800613-T0","tCount":3}],"PhoneNumber":"8007E9DVVI99IPMP24XI","ReviceName":"小伍","RevicePhoto":"13226656813","ReviceAdress":"良园二横路","PayType":"货到付款","iSum":"58.50","iTransFee":"0.00","iDiscountID":"0","cDiscountDescription":"此订单暂无优惠","iDiscount":"0.00","iTotal":"58.50","iPrePay":"0.00","iARmount":"58.50","dPSTimeStart":"9:00 ","dPSTimeEnd":" 10:00","CustomerCouponID":""}';
            var tPostParams = $.parseJSON(tJsonStr);
            alert(tJsonStr);
            $.ajax({
                url: tUrl,
                type: "Post",
                //data: {listname:"test", data: [{name:"123"},{name:"234",sex:"nan1"},{name:"456",sex:"nan2"}]},
                data:tPostParams,
                //data: { PhoneNumber: "18898733036", TestCode: "1126233", Password: "123456" },
                //data: { PhoneNumber:"18898733039", TestCode:"112233", Password:"123456", StoreName:"食来运转", StoreManagerName:"魏小伟", Province:"广东", City:"广州", District:"白云", Street:"45454", Address:"1212121", SaleCode:"00027", longitude:"", latitude:"", dPSTimeStart:"", dPSTimeEnd:"" },
                //data:{PhoneNumber:"18898733036",TestCode:"",Password:"123456",StoreName:"",StoreManagerName:"",OwnCity:"",Address:"",SaleCode:""},
                dataType: "json",
                async: false,
                success: function (data) {
                    alert(JSON.stringify(data));
                }
            });
        }
    </script>
</head>
<body>
    <button type="button" onclick="ajax_sendJson();">Click Me!</button>
</body>
</html>
